<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Updates the configuration settings for the specified tidy document</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.tidy-set-encoding.html">tidy_set_encoding</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.tidy-warning-count.html">tidy_warning_count</a></div>
 <div class="up"><a href="ref.tidy.html">Tidy 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.tidy-setopt" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">tidy_setopt</h1>
  <p class="verinfo">(PECL tidy &gt;= 0.5.2)</p><p class="refpurpose"><span class="refname">tidy_setopt</span> &mdash; <span class="dc-title">Updates the configuration settings for the specified tidy document</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.tidy-setopt-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>tidy_setopt</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$option</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>
   )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>tidy_setopt()</strong></span> updates the specified
   <em><code class="parameter">option</code></em> with a new <em><code class="parameter">value</code></em>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.tidy-setopt-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">option</code></em></dt>

     <dd>

      <p class="para">
       The tidy option name. A list of available configuration options may
       be found at: <a href="http://tidy.sourceforge.net/docs/quickref.html" class="link external">&raquo;&nbsp;http://tidy.sourceforge.net/docs/quickref.html</a>.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">value</code></em></dt>

     <dd>

      <p class="para">
       The tidy option name.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.tidy-setopt-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.tidy-setopt-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-3979">
    <p><strong>Example #1 <span class="function"><strong>tidy_setopt()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$html&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;p&gt;test&lt;/i&gt;'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$tidy&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">tidy_parse_string</span><span style="color: #007700">(</span><span style="color: #0000BB">$html</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">tidy_setopt</span><span style="color: #007700">(</span><span style="color: #DD0000">'indent'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.tidy-setopt-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">此函数仅可在 Tidy 1.0 中有效。在
Tidy 2.0 中，其已过时并已被移除。</span></p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.tidy-setopt-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member"><span class="function"><a href="tidy.getopt.html" class="function" rel="rdfs-seeAlso">tidy_getopt()</a> - Returns the value of the specified configuration option for the tidy document</span></li>
   <li class="member"><span class="function"><a href="tidy.getconfig.html" class="function" rel="rdfs-seeAlso">tidy_get_config()</a> - Get current Tidy configuration</span></li>
   <li class="member"><span class="function"><a href="function.tidy-reset-config.html" class="function" rel="rdfs-seeAlso">tidy_reset_config()</a> - Restore Tidy configuration to default values</span></li>
   <li class="member"><span class="function"><a href="function.tidy-save-config.html" class="function" rel="rdfs-seeAlso">tidy_save_config()</a> - Save current settings to named file</span></li>
  </ul>
 </div>

 
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.tidy-set-encoding.html">tidy_set_encoding</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.tidy-warning-count.html">tidy_warning_count</a></div>
 <div class="up"><a href="ref.tidy.html">Tidy 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
